OLE problem: Microsoft Office Excel cannot paste the data.

This code gives me the error "OLE problem: Microsoft Office Excel cannot paste the data." (from the print statement):
 

if (oleIsObject (o))
{
    string s = richTextWithOle (o."Object Text")
        RichText rtf
        for rtf in s do
        {
                if (rtf.isOle)
                {
                        EmbeddedOleObject ole = rtf.getEmbeddedOle
                        oleCopy (ole)
 
                        OleAutoArgs autoArgs = create
                        clear (autoArgs)
                        put (autoArgs, row)
                        put (autoArgs, col)
                        oleGet (objWorksheet, "Cells", autoArgs, objCell) // select cell
 
                        clear (autoArgs)
                        put (autoArgs, objCell)
                        string res = oleMethod (objWorksheet, "Paste", autoArgs)
                        delete autoArgs
                        if (res != "") print identifier (o) " " res "\n"
                }
        }
}

 


You can assume I have an open instance of Excel and can export text to cells successfully. Unfortunately, I'm having a terrible time exporting OLE objects.

Any ideas why I'm getting this error?

 


SystemAdmin - Tue Mar 02 11:50:09 EST 2010

Re: OLE problem: Microsoft Office Excel cannot paste the data.
SystemAdmin - Wed Mar 03 09:40:28 EST 2010

https://www.ibm.com/developerworks/forums/thread.jspa?threadID=320577&tstart=0